package edu.xhu.api.id;

import edu.xhu.api.id.fallback.IdClientFallback;
import edu.xhu.model.common.dtos.ResponseResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "bili-distributed-id", fallback = IdClientFallback.class)
public interface IdClient {

    //号段模式获取分布式id
    @GetMapping("/bili_distributed_id/segment")
    ResponseResult<?> getSegmentDistributedId(@RequestParam String key);

    @GetMapping("/bili_distributed_id/snowflake")
    ResponseResult<?> getSnowflakeDistributedId();
}
